package com.ruoyi.system.mapper.estate.emergency;

import java.util.List;
import java.util.Map;
import com.ruoyi.system.domain.estate.emergency.EmergencySuppliesStock;

/**
 * 应急物资库存Mapper接口
 */
public interface EmergencySuppliesStockMapper {
    /**
     * 查询应急物资库存列表
     * 
     * @param emergencySuppliesStock 应急物资库存信息
     * @return 应急物资库存集合
     */
    public List<EmergencySuppliesStock> selectEmergencySuppliesStockList(EmergencySuppliesStock emergencySuppliesStock);

    /**
     * 查询应急物资库存详细信息
     * 
     * @param stockId 应急物资库存ID
     * @return 应急物资库存信息
     */
    public EmergencySuppliesStock selectEmergencySuppliesStockById(Long stockId);
    
    /**
     * 根据物资ID和位置ID查询库存信息
     * 
     * @param emergencySuppliesStock 应急物资库存信息
     * @return 应急物资库存信息
     */
    public EmergencySuppliesStock selectEmergencySuppliesStockBySuppliesIdAndLocationId(EmergencySuppliesStock emergencySuppliesStock);

    /**
     * 新增应急物资库存
     * 
     * @param emergencySuppliesStock 应急物资库存信息
     * @return 结果
     */
    public int insertEmergencySuppliesStock(EmergencySuppliesStock emergencySuppliesStock);

    /**
     * 修改应急物资库存
     * 
     * @param emergencySuppliesStock 应急物资库存信息
     * @return 结果
     */
    public int updateEmergencySuppliesStock(EmergencySuppliesStock emergencySuppliesStock);

    /**
     * 删除应急物资库存
     * 
     * @param stockId 应急物资库存ID
     * @return 结果
     */
    public int deleteEmergencySuppliesStockById(Long stockId);

    /**
     * 批量删除应急物资库存
     * 
     * @param stockIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteEmergencySuppliesStockByIds(Long[] stockIds);
    
    /**
     * 获取即将过期物资列表
     * 
     * @param days 天数
     * @return 即将过期物资列表
     */
    public List<EmergencySuppliesStock> selectExpiringSuppliesList(int days);
    
    /**
     * 获取应急物资分布情况
     * 
     * @return 分布情况
     */
    public List<Map<String, Object>> selectEmergencySuppliesDistribution();
} 